//package com.dlwx.parttimetalent.fragment.label;
//
//import android.content.Context;
//import android.net.Uri;
//import android.os.Bundle;
//import android.support.v4.app.Fragment;
//import android.support.v7.widget.GridLayoutManager;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//
//import com.dlwx.parttimetalent.R;
//import com.dlwx.parttimetalent.adapter.LabelAdapter;
//import com.dlwx.parttimetalent.bean.LabelBean;
//import com.dlwx.parttimetalent.views.PricingDialog;
//import com.github.jdsjlzx.ItemDecoration.GridItemDecoration;
//import com.github.jdsjlzx.interfaces.OnItemClickListener;
//import com.github.jdsjlzx.recyclerview.LRecyclerView;
//import com.github.jdsjlzx.recyclerview.LRecyclerViewAdapter;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import butterknife.BindView;
//import butterknife.ButterKnife;
//import butterknife.Unbinder;
//
//
//public class LabelZeroFragment extends Fragment {
//    private static final String ARG_PARAM1 = "param1";
//    private static final String ARG_PARAM2 = "param2";
//    @BindView(R.id.recyclerView)
//    LRecyclerView recyclerView;
//    Unbinder unbinder;
//
//    private String mParam1;
//    private String mParam2;
//    private LabelAdapter mAdapter;
//    private List<LabelBean> mDatas;
//
//    private OnFragmentInteractionListener mListener;
//
//    public LabelZeroFragment() {
//        // Required empty public constructor
//    }
//
//
//    public static LabelZeroFragment newInstance(String param1, String param2) {
//        LabelZeroFragment fragment = new LabelZeroFragment();
//        Bundle args = new Bundle();
//        args.putString(ARG_PARAM1, param1);
//        args.putString(ARG_PARAM2, param2);
//        fragment.setArguments(args);
//        return fragment;
//    }
//
//    @Override
//    public void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        if (getArguments() != null) {
//            mParam1 = getArguments().getString(ARG_PARAM1);
//            mParam2 = getArguments().getString(ARG_PARAM2);
//        }
//    }
//
//    @Override
//    public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                             Bundle savedInstanceState) {
//        View view = inflater.inflate(R.layout.fragment_label_zero, container, false);
//        unbinder = ButterKnife.bind(this, view);
//        initView();
//        return view;
//    }
//
//    private void initView() {
//        recyclerView.setLayoutManager(new GridLayoutManager(getActivity(),5));
//        mAdapter=new LabelAdapter(getActivity());
//        mDatas=new ArrayList<LabelBean>();
//        for(int i=0;i<20;i++){
//            LabelBean bean=new LabelBean();
//            bean.setId(i);
//            bean.setLabelName("标签"+i);
//            mDatas.add(bean);
//        }
//        mAdapter.setDataList(mDatas);
//        LRecyclerViewAdapter lRecyclerViewAdapter=new LRecyclerViewAdapter(mAdapter);
//        //divider
//        GridItemDecoration divider = new GridItemDecoration.Builder(getActivity())
//                .setHorizontal(R.dimen.size_4)
////                 .setVertical(R.dimen.size_4)
//                .setColorResource(R.color.white)
//                .build();
//        recyclerView.setHasFixedSize(true);
//        recyclerView.addItemDecoration(divider);
//        recyclerView.setAdapter(lRecyclerViewAdapter);
//        recyclerView.setLoadMoreEnabled(false);
//        recyclerView.setPullRefreshEnabled(false);
//        lRecyclerViewAdapter.setOnItemClickListener(new OnItemClickListener() {
//            @Override
//            public void onItemClick(View view, int position) {
////                LabelBean bean = mAdapter.getDataList().get(position);
////                mListener.onFragmentInteraction(null);
//                PricingDialog dialog=new PricingDialog(getActivity());
//                dialog.show();
//            }
//        });
//    }
//
//    public void onButtonPressed(Uri uri) {
//        if (mListener != null) {
//            mListener.onFragmentInteraction(uri);
//        }
//    }
//
//    @Override
//    public void onAttach(Context context) {
//        super.onAttach(context);
//        if (context instanceof OnFragmentInteractionListener) {
//            mListener = (OnFragmentInteractionListener) context;
//        } else {
////            throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener");
//        }
//    }
//
//    @Override
//    public void onDetach() {
//        super.onDetach();
//        mListener = null;
//    }
//
//    @Override
//    public void onDestroyView() {
//        super.onDestroyView();
//        unbinder.unbind();
//    }
//
//    public interface OnFragmentInteractionListener {
//        // TODO: Update argument type and name
//        void onFragmentInteraction(Uri uri);
//    }
//}
